import { axios } from '@/utils/request'



// 获取邮箱验证码
export function getEmailCode (data) {
  return axios({
    url: '/user/getEmailCode',
    method: 'get',
    data
  })
}

// 注册用户
export function registerUser (data) {
  return axios({
    url: '/user/register',
    method: 'post',
    data
  }) 
}

// 登录
export function login (data) {
  return axios({
    url: '/user/login',
    method: 'post',
    data
  })
}

// 获取用户信息
export function userInfo () {
  return axios({
    url: '/user/getUserInfo',
    method: 'get',
  })
}

export function logout () {
  return axios({
    url: '/user/logout',
    method: 'get'
  })
}


